﻿ #region Disclaimer/Info
 
 /////////////////////////////////////////////////////////////////////////////////////////////////
 //
 //   File:		EventHandlerExtension.cs
 //   Website:		http://dexterblogengine.com/
 //   Authors:		http://dexterblogengine.com/About.ashx
 //   Rev:		1
 //   Created:		19/01/2011
 //   Last edit:		19/01/2011
 //   License:		GNU Library General Public License (LGPL)
 //   File:            EventHandlerExtension.cs
 //   For updated news and information please visit http://dexterblogengine.com/
 //   Dexter is hosted to Codeplex at http://dexterblogengine.codeplex.com
 //   For any question contact info@dexterblogengine.com
 //
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 #endregion
 
namespace System
{
	///<summary>
	///	Add functions to the EventHandler.
	///</summary>
	public static class EventHandlerExtension
	{
		/// <summary>
		/// 	Raises the specified handler.
		/// </summary>
		/// <typeparam name = "T"></typeparam>
		/// <param name = "handler">The handler.</param>
		/// <param name = "sender">The sender.</param>
		/// <param name = "args">The args.</param>
		public static void Raise< T > ( this EventHandler<T> handler , object sender , T args )
			where T : EventArgs
		{
			if ( handler != null )
				handler.Invoke ( sender , args );
		}
	}
}
